package com.service.impl;

import com.mapper.ParkMapper;
import com.pojo.Park;
import com.service.ParkService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ParkServiceimpl implements ParkService {
    @Resource
    private ParkMapper parkMapper;
    @Override
    public List<Park> selectAll(Park park) {
        List<Park> parks = parkMapper.selectAll(park);
        return parks;
    }

    @Override
    public void insert(Park park) {
        parkMapper.insert(park);
    }

    @Override
    public Park selectParkById(Integer id) {
        Park park = parkMapper.selectParkById(id);
        return park;
    }

    @Override
    public List<Park> selectAllPark() {
        List<Park> parks = parkMapper.selectAllPark();
        return parks;
    }
}
